package com.kimastrom.theGame.Controll;

import android.os.Handler;
import android.os.Message;

class RefreshHandler extends Handler {

	private IUpdatable m_Iupdatable;
	
	public RefreshHandler(IUpdatable a_Iupdatable) {
		m_Iupdatable = a_Iupdatable;
	}
	
    @Override
    public void handleMessage(Message msg) {
    	m_Iupdatable.update();
    }

    public void sleep(long delayMillis) {
        this.removeMessages(0);
        sendMessageDelayed(obtainMessage(0), delayMillis);
    }
}
